package com.niuniu.rushdorm.service.impl;


import com.niuniu.rushdorm.mapper.GroupUserMapper;

import com.niuniu.rushdorm.service.GroupService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GroupServiceImpl implements GroupService {

    @Autowired
    private GroupUserMapper groupsUserMapper;

    @Override
    public Integer getGroupId(Integer uid) {
        return groupsUserMapper.getGroupIdByUid(uid);
    }

    @Override
    public List<Integer> getUids(Integer groupId) {
        return groupsUserMapper.getUidsByGroupId(groupId);
    }
}
